/*
 * @Author: 李超越 1509572300@qq.com
 * @Date: 2024-09-07 11:52:55
 * @LastEditors: 李超越 1509572300@qq.com
 * @LastEditTime: 2024-09-15 18:51:29
 * @FilePath: /my_git/lesson32_socket/Main.cc
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
#include "UdpServer.hpp"
#include "Log.hpp"
#include "InetAddr.hpp"

void Usage(string proc)
{
    cout << "Usage:\n\t" << proc << "local_ip Local_prot\n" << endl;
}

int main(int argc,char* argv[])
{
    if(argc!=2)
    {
        Usage(argv[0]);
        exit(USAGE_ERROR);
    }
    EnableScreen() ;
    //string ip = argv[1];
    uint16_t port = stoi(argv[2]);
    unique_ptr<UdpServer> usvr = make_unique<UdpServer>(port);
    usvr->InitServer();
    usvr->Start();
    return 0;
}